import  java.util.Random;
public class dust {
    //定义一个数组,存入1到5,要求打乱数组中的元素
    public static void main(String[] args) {
        int arr[] = {1, 2, 3, 4, 5};
        Random r = new Random ();
        int number = r.nextInt(arr.length);
        for (int i = 0; i < arr.length; i++) {
            int newm = arr[i];
            arr [i] = arr [number];
             arr[number] = newm;
        }
        for (int i1 = 0; i1 < arr.length; i1++) {
            System.out.print(arr[i1]);
        }
        }
    }


